/**
 *
 *
 * @author  MENG
 * @version 1.0
 * @time    2017/12/18
 * @see
 */
$(function(){

    document.querySelector('.img__btn').addEventListener('click', function() {

        document.querySelector('.cont').classList.toggle('s--signup');

    });

});


function login()
{
    var login_eamil = $("#login_eamil").val();

    var login_password = $("#login_password").val();

    $.ajax({

        url : "/login",

        type : 'POST',

        data : {email:login_eamil,password:login_password},

        async : true,

        success : function(data)
        {
            if(data == false)
            {
                alert("邮箱或密码错误!");

                return;
            }

            window.location.href = getUrlParameter("requestUrl");
        },

        error:function()
        {
            window.location.href = "/err/500";
        }
    });

}
